﻿<?php
session_start();
if(!$_SESSION['login'] || $_SESSION['login'] != 1){
    header('Location:../mm');
    exit;
}
require ('quanju.php');
$ztdx = 20;
$result = $conn->query("SELECT * FROM hg002 WHERE sjh='{$_SESSION['sjh']}'");
if($result && $row = mysqli_fetch_array($result)){
   $ztdx = $row['tybztdx'];
}
if($ztdx > 100 || $ztdx <= 0){
    $ztdx = 20;
}
if(isset($_GET['dizeng']) && substr($_GET['dizeng'],0,1) == 'd'){
    $ewai = '';
    if(!strpos($row['jkm'],'!') === false)
        $ewai = '!';
    if ($conn->query("UPDATE hg002 SET jkm='{$_GET['dizeng']}{$ewai}' WHERE sjh='{$_SESSION['sjh']}'")) {
        $_SESSION['jkm'] = $_GET['dizeng'];
    }
}
$jkm = $_SESSION['jkm'];
$conn->close();
?>
<!DOCTYPE html>
<html>
  
  <head>
    <title>
      画板
    </title>
    <meta charset="utf-8" />
    <meta name="format-detection" content="telephone=no" />
    <meta name="browsermode" content="application"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-touch-fullscreen" content="yes" />
    <meta http-equiv="Access-Control-Allow-Origin" content="*" />
    <script type="text/javascript" src="js/zDrag.js"></script>
    <script type="text/javascript" src="js/zDialog.js"></script>
    <script type="text/javascript" src="../s/jquery-3.1.1.min.js"></script>
    <script>
    var sjh = '<?php echo $_SESSION['sjh']; ?>';
    </script>
    <script src="js/tyb.js"></script>
    <style>
    .imgbox img{width:300px} 
    .top_fk{
        position: fixed;
        width: 50px;
        right: 80px;
        top: 0px;
        height:50px;
        line-height: 50px;
        background: url(images/tyb_hsfk.png) no-repeat 0px 50%;
        background-size:22px 22px;
        background-position:0px center;
    }
    .top_daohang{
        position: fixed;
        width: 65px;
        left: 0px;
        top: 0px;
        color:#cc9900;
        padding-left:15px;
        height:50px;
        font-size:17px;
        line-height: 50px;
        font-weight:500;
        background-size:25px 25px;
        background-position:0px center;
    }
    .top_cx{
        position: fixed;
        width: 50px;
        left: 65px;
        top: 0px;
        height:50px;
        line-height: 50px;
        background: url(images/tyb_cx_a.png) no-repeat 0px 50%;
        background-size:28px 28px;
        background-position:0px center;
    }
    .top_cf{
        position: fixed;
        width: 50px;
        left: 110px;
        top: 0px;
        height:50px;
        line-height: 50px;
        background: url(images/tyb_cf_a.png) no-repeat 0px 50%;
        background-size:28px 28px;
        background-position:0px center;
    }
    .top_yonghu{
        position: fixed;
        width: 50px;
        right: 40px;
        top: -3px;
        height:50px;
        line-height: 50px;
        background: url(images/tyb_fk.png) no-repeat 0px 50%;
        background-size:24px 24px;
        background-position:0px center;
    }
    .top_fenxiang{
        position: fixed;
        width: 50px;
        right: 0px;
        top: 0px;
        height:50px;
        line-height: 50px;
        background: url(images/bwl_fenxiang.png) no-repeat 0px 50%;
        background-size:22px 22px;
        background-position:0px center;
    }
    .bottom{
        z-index:3;
        position: fixed;
        width: 100%;
        left:0px;
        bottom: 0px;
              
    }img{width:100%}
    .gtp{
        text-align: center;
        max-height:50%;
    }img{
        width:100%
        }
    .top{
        z-index:3;
        position: fixed;
        width: 100%;
        left:0px;
        top: 0px;
        height:50px;
        line-height: 50px;
        background: url(images/tyb_bg.png);
    }img{width:100%}
    .tyb{
        position: absolute;
        left:0px;
        top: 0px;
        width: 100%;
        height:100%;
        margin: 0;
        padding: 0;
        display: block;
    }
    .control-ops{
        display: none;
    }
    .xx{
        z-index:2;
        position: absolute;
        top: 50px;
        width: 100%;
        left:0px;
        bottom: 0px;
        font-size:<?php echo $ztdx; ?>px;
        <?php if($_SESSION['tybckfs'] == 'hh')echo 'pointer-events:none;'; ?>
    }
    * {
-webkit-touch-callout:none;
-webkit-user-select:none;
-khtml-user-select:none;
-moz-user-select:none;
-ms-user-select:none;
user-select:none;
    }
    </style>
  </head>
  
  <body style="background: url(images/bwl_bg.png);height: 100%;width: 100%;margin: 0;padding: 0;">

  <div class="top"><div class="top_daohang">完成</div><div class="top_cx" onclick="ty_cx();" id="top_cx"></div><div class="top_cf" onclick="ty_cf();" id="top_cf"></div><div onclick="qingkong();" id="fangkuaitubiao" class="top_fk"></div><div id="yonghutubiao" onclick="window.location.href='getLJ.php';" class="top_yonghu"></div><div onclick="if(confirm('对接码：<?php 
  
    if(substr($jkm,0,1) == 'd'){
        echo '远程 '.substr($jkm,1);
    }else{
         if($jkm <= 0){
            echo '无';
        }else if($jkm % 10 == 9) echo 10 * ($jkm - $jkm % 10 + 10) + 10;
        else echo $jkm + 11;
        if($_SESSION['gjdj'] == 1){
            echo '，';
        if($_SESSION['XXjkm'] <= 0)
            echo '无';
        else
            echo $_SESSION['XXjkm'];
    }
  }
    
   ?>\n是否断开？'))window.location.href='002.php?sx=1&dk=1';" class="top_fenxiang"></div></div>
   
   <div class="xx" id="xx" onclick="xsyc();" style="display: none;"><div id="huidiao" style="text-align: center;"></div><div class="gtp" id="huidiao2"></div><div class="xx" id="xx2" style="top: 0px;"></div></div>
  <div id="jzcd" class="bottom" <?php
    if($_SESSION['tybckfs'] == 'hh'){
        echo 'onclick="zbxsyc();"';
    }
    else if($_SESSION['tybckfs'] == 'az'){
        echo 'ontouchstart="xsyc(1);"';
        echo ' ontouchend="xsyc(-1);" ontouchcancel="xsyc(-1);"';
    }else{
        echo 'onclick="xsyc(0);"';
    }
  
  ?>><img id="gjl" src="images/tyb_gjl.png" /></div>
    <canvas id="myCanvas" class="tyb"></canvas>
    <div style="text-align:center;">
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />

</div>
    
    <br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
 
 
    <div id="div1"></div>
  </body>
</html>